# _*_ coding: utf-8 _*_
# @Time:2024/5/17 16:20
# @Author:10917
# @File:throttles.py
from rest_framework.throttling import AnonRateThrottle, UserRateThrottle


class CustomArticleListAnonRateThrottle(AnonRateThrottle):
    """
    自定义限流器

        未认证用户限流  3次/分钟 请求
    """
    THROTTLE_RATES = {"anon": "3/min"}


class CustomArticleListUserRateThrottle(UserRateThrottle):
    """
    自定义限流器

      已认证用户限流  8次/分钟 请求
    """
    THROTTLE_RATES = {"user": "8/min"}
